package hamcrest.entity;

import java.util.Objects;

public class Biscuit {
    private String name;
    private int chocolateChipCount;
    private int hazelnutCount;

    public Biscuit(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getChocolateChipCount() {
        return chocolateChipCount;
    }

    public void setChocolateChipCount(int chocolateChipCount) {
        this.chocolateChipCount = chocolateChipCount;
    }

    public int getHazelnutCount() {
        return hazelnutCount;
    }

    public void setHazelnutCount(int hazelnutCount) {
        this.hazelnutCount = hazelnutCount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Biscuit biscuit = (Biscuit) o;
        return Objects.equals(name, biscuit.name);
    }

    @Override
    public int hashCode() {

        return Objects.hash(name);
    }

    @Override
    public String toString() {
        return "Biscuit{" +
                "name='" + name + '\'' +
                '}';
    }
}
